package test;

import javax.swing.*;
import java.awt.*;

public class rentCarFrame extends JFrame {
    JLabel label;
    JButton button1,button2;
    public rentCarFrame() {
        setTitle("车辆租赁");
        setLayout(null);
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        setBounds(500,400,400,250);
        label = new JLabel("请选择要租赁的天数：");
        label.setFont(new Font("宋体",Font.BOLD,15));
        label.setBounds(120,30,300,50);
        SpinnerNumberModel spinnerModel = new SpinnerNumberModel(1, 1, 100, 1);
        JSpinner spinner = new JSpinner(spinnerModel);
        spinner.setBounds(150,80,100,30);
        button1=new JButton("租赁");
        button1.setBounds(50,140,100,40);
        button2=new JButton("取消");
        button2.setBounds(250,140,100,40);
        add(label);
        add(spinner);
        add(button1);
        add(button2);
        setVisible(true);
    }

    public static void main(String[] args) {
        new rentCarFrame();
    }
}
